/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.uml_generator.manager;

import java.util.Set;

import com.genia.toolbox.basics.exception.BundledException;
import com.genia.toolbox.uml_generator.model.AbstractClassModel;
import com.genia.toolbox.uml_generator.model.AttributeModel;
import com.genia.toolbox.uml_generator.model.OperationModel;

/**
 * manager to handle attributes.
 */
public interface AttributeManager
{

  /**
   * returns an {@link OperationModel} corresponding to the getter of an
   * attribute.
   * 
   * @param attribute
   *          the {@link AttributeModel} to get the getter for
   * @return an {@link OperationModel} corresponding to the getter of the
   *         attribute
   */
  public abstract OperationModel getGetter(AttributeModel attribute);



  /**
   * return a {@link ParameterModel} for a <code>void</code> return type.
   * 
   * @return a {@link ParameterModel} for a <code>void</code> return type
   */
  public abstract AttributeModel getVoidReturnType();



  /**
   * returns an {@link OperationModel} corresponding to the setter of an
   * attribute.
   * 
   * @param attribute
   *          the {@link AttributeModel} to get the setter for
   * @return an {@link OperationModel} corresponding to the setter of the
   *         attribute
   */
  public abstract OperationModel getSetter(AttributeModel attribute);



  /**
   * return the {@link Set} of {@link AttributeModel} that are new to the
   * {@link AbstractClassModel} given in parameter.
   * 
   * @param classModel
   *          the {@link AbstractClassModel} to inspect.
   * @return the {@link Set} of {@link AttributeModel} that are new to the
   *         {@link AbstractClassModel} given in parameter
   */
  public abstract Set<AttributeModel> newAttributes(AbstractClassModel classModel);



  /**
   * return the {@link Set} of {@link AttributeModel} that are new to the
   * {@link AbstractClassModel} given in parameter.
   * 
   * @param classModel
   *          the {@link AbstractClassModel} to inspect.
   * @return the {@link Set} of {@link AttributeModel} that are new to the
   *         {@link AbstractClassModel} given in parameter
   */
  public abstract Set<AttributeModel> newAttributesForInterface(AbstractClassModel classModel);



  /**
   * return the {@link Set} of {@link AttributeModel} without the identifier if
   * it exists..
   * 
   * @param classModel
   *          the {@link AbstractClassModel} to inspect.
   * @return the {@link Set} of {@link AttributeModel} without the identifier if
   *         it exists.
   * @throws BundledException
   *           when an error occurred
   */
  public abstract Set<AttributeModel> removeIdentifier(AbstractClassModel classModel)
      throws BundledException;
}
